Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.220
diff -u -p -r1.220 bootstrap.inc
--- includes/bootstrap.inc	21 Aug 2008 19:36:36 -0000	1.220
+++ includes/bootstrap.inc	1 Sep 2008 11:20:02 -0000
@@ -655,9 +655,11 @@ function drupal_page_cache_header($cache
   header("Last-Modified: $last_modified");
   header("ETag: $etag");
 
-  // The following headers force validation of cache:
-  header("Expires: Sun, 19 Nov 1978 05:00:00 GMT");
-  header("Cache-Control: must-revalidate");
+  // The following headers makes for better caching for anonymous users
+  // this applies to reverse proxies as well as browser caches too.
+  $cache_lifetime = variable_get('cache_lifetime', 0);
+  header("Expires: ". gmdate("D, d M Y H:i:s", time() + $cache_lifetime) ." GMT");
+  header("Cache-Control: public, max-age=". $cache_lifetime);
 
   if (variable_get('page_compression', TRUE)) {
     // Determine if the browser accepts gzipped data.
